Skip to content

Comments

feat: add speaker diarization via pyannote-local#3821

Open
pavelsamoylenko wants to merge 2 commits intofastrepl:mainfrom
pavelsamoylenko:feat/speaker-diarization
Open

feat: add speaker diarization via pyannote-local#3821
pavelsamoylenko wants to merge 2 commits intofastrepl:mainfrom
pavelsamoylenko:feat/speaker-diarization

Conversation

@pavelsamoylenko
Copy link
Contributor

@pavelsamoylenko pavelsamoylenko commented Feb 10, 2026

Summary

  • Adds a "Diarize Speakers" button to the session overflow menu
  • Runs local speaker diarization on recorded audio using pyannote ONNX models (segmentation + embedding + clustering)
  • Maps diarization segments to transcript words by time overlap and writes provider_speaker_index hints to TinyBase
  • Supports 2/3/4/Auto (up to 6) speaker count options

Backend

  • New diarize and identify modules in pyannote-local crate
  • Running average centroids for stable speaker identification
  • Min segment duration filter (0.5s) to skip noisy short segments
  • Post-processing smoothing to eliminate isolated speaker switches
  • diarize_session command in listener2 plugin with Tauri v2 permissions

Frontend

  • Diarize dropdown component in session overflow menu
  • On success: maps segments to words by midpoint overlap, writes hints
  • Supports multi-transcript sessions with timestamp offset
  • Shows loading spinner during diarization

Other

  • Adds cargo:rerun-if-changed to data/build.rs to prevent file watcher loops during dev

Test plan

  • Open a session with audio recording
  • Click overflow menu → "Diarize Speakers" → select speaker count
  • Verify loading spinner appears during diarization
  • Verify transcript shows speaker labels after completion
  • Re-run diarization to verify old hints are replaced
  • Test with multi-transcript session

@netlify
Copy link

netlify bot commented Feb 10, 2026

👷 Deploy request for hyprnote pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 1a5ba2d

@netlify
Copy link

netlify bot commented Feb 10, 2026

Deploy Preview for hyprnote-storybook canceled.

Name Link
🔨 Latest commit 1a5ba2d
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote-storybook/deploys/699b2eeef080e00008996d86

Adds a "Diarize Speakers" button to the session overflow menu that runs
local speaker diarization on recorded audio using pyannote segmentation
and embedding models. Segments are mapped to transcript words and written
as provider_speaker_index hints to TinyBase.

Backend:
- New diarize/identify modules in pyannote-local crate
- Running average centroids for stable speaker identification
- Min segment duration filter (0.5s) and smoothing post-processing
- diarize_session command in listener2 plugin with Tauri permissions

Frontend:
- Diarize dropdown with 2/3/4/Auto speaker count options
- Maps diarization segments to words by time midpoint overlap
- Supports multi-transcript sessions with timestamp offset

Also adds cargo:rerun-if-changed to data build.rs to prevent watcher loops.
@pavelsamoylenko pavelsamoylenko force-pushed the feat/speaker-diarization branch from 10e4fb6 to 1a5ba2d Compare February 22, 2026 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant